import com.sun.xml.internal.ws.api.ha.StickyFeature;

import java.util.Arrays;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
      /*  int a = 11;
        String s = String.valueOf(a);
        System.out.println(s+ 1);

        String str = "123";
        int b = Integer.parseInt(str);
        System.out.println(b+1);*/

      /*  int[] arr = {1,2,3,4};
        String ret = Arrays.toString(arr);
        System.out.println(ret);*/

    /*    String arr = "abcd";
        char[] ret = arr.toCharArray();
        for (char c:ret) {
            System.out.print(c+ " ");
        }*/
        // String arr = "abcdA@111@22,12";
       /* String ARR = arr.toUpperCase();
        System.out.println(ARR);*/
       /* String[] str = arr.split("@ ");
        for (int i = 0; i < str.length; i++) {
        S




*/
       /* String arr = "abcb";
        String ret = arr.replace("a","b");
        String A = arr.replaceAll("ab","cc");
        System.out.println(A);
        String  bb = arr.replaceFirst("b","a");
        System.out.println(bb);
*//*
        String arr = "abcdabd";
        int index = arr.indexOf("ab");
        System.out.println(index);

        char ch = arr.charAt(3);
        System.out.println(ch);

        int index2 = arr.lastIndexOf("ab");
        System.out.println(index2);*/
/*

        String s1 = "abcd";
        String s2 = "abcd";
        String s3 = "ABCD";
        System.out.println(s1.equals(s2));
        System.out.println(s1.equals(s3));
        System.out.println(s1.equalsIgnoreCase(s3));
*/

      /*  String str = "abdbdsafs";
        String ret = str.substring(5);
        System.out.println(ret);
        String ret1 = str.substring(5,6);
        System.out.println(ret1);
        String  ret2 = ret1.trim();
        System.out.println(ret2);
*/
/*

        StringBuilder stringBuilder = new StringBuilder("Abcde");
        stringBuilder.append("fgh");
        stringBuilder.reverse();
        ;
        System.out.println(stringBuilder);
*/
        /*int[] arr = {1,23,45,33,2,3};
        int[] a = arr.clone();
        String ret = Arrays.toString(a);
        System.out.println(ret);*/
   /*     String str = "aa";
        StringBuilder arr = new StringBuilder(str);
        arr.reverse();
        int count = 0;
        for (int i = 0; i < arr.length(); i++) {
            if (arr[i] != " ")
        }
*/

       /* int[] arr= {1,23,4};*/


     /*   int[] str = Arrays.copyOfRange(arr,2,4);
        String ret = Arrays.toString(str);
        System.out.println(ret);*/
     /*   Arrays.sort(arr);
        int index = Arrays.binarySearch(arr,2);
        System.out.println(index);*/
       /* for (int x:arr) {
            System.out.println(x);
        }*/


     /*   StringBuilder stringBuilder = new StringBuilder("qqq");
        stringBuilder.append("www");
        String str = "hh";
        int[] arr = {1,2,3,4};

        System.out.println(Arrays.toString(arr));
        stringBuilder.reverse();

        String a = String.valueOf(arr);

        System.out.println(a);*/
     /*   System.out.println(arr.length);
        System.out.println(str.length());*/
       /* System.out.println(stringBuilder);*/
        class Solution {
            public static boolean is_zishu(char ch) {
       if((ch >= 'a' && ch <= 'z') ||
        (ch >= '0' && ch <= '9')) {
                    return true;
                }
                return false;
            }
            public boolean isPalindrome(String s) {
                String str = s.toLowerCase();
                int left = 0;
                int right = s.length() - 1;
                while (left < right) {
                    while (left < right && !is_zishu(str.charAt(left))) {
                        left++;
                    }
                    while (left < right && !is_zishu(str.charAt(right))) {
                        right--;
                    }
                    if (str.charAt(left) != str.charAt(right)) {
                        return false;
                    } else {
                        left++;
                        right--;
                    }
                    return true;

                }

            }
        }